import request from '@/utils/request'

export function getdept(params) {
  return request({
    url: '/sysdept/queryDept',
    method: 'get',
    params
  })
}


export function querylistdept(params) {
  return request({
    url: '/sysdept/querylistdept',
    method: 'get',
    params
  })
}

export function querybyid(id) {
  return request({
      url: '/sysdept/detail',
      method: 'get',
      params: { id }
  })
}

export function fetchPv(pv) {
  return request({
      url: '/sysdept/pv',
      method: 'get',
      params: { pv }
  })
}

export function createArticle(data) {
  return request({
      url: '/sysdept/savetrans',
      method: 'post',
      data
  })
}

export function updateArticle(data) {
  return request({
      url: '/sysdept/updatetrans',
      method: 'put',
      data
  })
}

export function deleteArticle(sid) {
  return request({
      url: '/sysdept/deletetrans/' + sid,
      method: 'delete',
      params: { sid }
  })
}

